<template>
    <div class="Detail">
       <h1>id:{{ query.id }}</h1>
       <h1>title:{{ query.title }}</h1>
       <h1>contend:{{ query.content }}</h1>
    </div>
    
</template>


<script lang="ts" setup name="Detail">
    import {useRoute} from "vue-router"; //useRoute是一个hooks
    import { toRefs } from "vue";
    let route = useRoute()
    let {query} = toRefs(route)  //使用toRefs从route解构query属性可以保留响应式
    console.log(route)
</script>

<style scoped>

</style>